package practice;

import java.io.FileReader;
import java.io.IOException;

public class ReadingFiles {

	static char[] chars = new char[10000];
	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void read(String fileName) throws IOException {
		StringBuffer sBuffer = new StringBuffer();
		try{
			FileReader reader = new FileReader(fileName);
			int l;
			sBuffer = new StringBuffer();
			
			while((l = reader.read(chars)) != -1)
				sBuffer.append(chars,0,l);
			
			
//			sBuffer.append(chars,0,l);
		} catch(Exception e){
			
		} finally{
			
		}
		System.out.println(sBuffer.toString());
	}

}
